<?php
namespace app\superAdmin\controller;
use \think\Controller;
use \think\Db;


class File extends Controller 
{
	public function index()
    {
    	$files = Db::name('file_ck')->select();
    	$this->assign("fileList",$files);
        return $this->fetch();;
    }
    public function find(){
    	$findfid=input('findfid');
    	$finduid=input('finduid');

    	if ($findfid!=NULL) {
    		$registration=Db::query("select * from `file_ck` where fid='$findfid'");
		    $this->assign("fileList",$registration);
		    return $this->fetch("index");
    	}elseif ($finduid!=NULL) {
    		$registration=Db::query("select * from `file_ck` where uid='$finduid'");
		    $this->assign("fileList",$registration);
		    return $this->fetch("index");
    	}else{
    		$registration=Db::query("select * from `file_ck`");
		    $this->assign("fileList",$registration);
		    return $this->fetch("index");
    	}
    }
    

}